Skip to content

docs(example): byo-backend-console README teaches ObjectView from plugin-view, not the phantom ObjectRenderer - #7942

Merged
baozhoutao merged 1 commit into
mainfrom
claude/issue-7095-byo-backend-readme-objectview
Sep 6, 2026
Merged

docs(example): byo-backend-console README teaches ObjectView from plugin-view, not the phantom ObjectRenderer#7942
baozhoutao merged 1 commit into
mainfrom
claude/issue-7095-byo-backend-readme-objectview

Conversation

@claude

@claude claude Bot commented Sep 6, 2026

Copy link
Copy Markdown
Contributor

Fixes #7095

What was wrong

examples/byo-backend-console/README.md taught ObjectRenderer from @object-ui/app-shell in three snippets — six sites, at lines 63, 72, 88, 89, 107, 110. No export of any package in this repository bears that name, so the import does not resolve. This README is the copy-paste starting point for the bring-your-own-backend path, whose readers have no way to tell a phantom name from a real one.

Why not a bare rename

The card proposed renaming to @object-ui/app-shell's ObjectView. That was measured on this branch and rejected. packages/app-shell/src/views/ObjectView.tsx:865 is export function ObjectView({ dataSource, objects, onEdit, externalRefreshKey }: any) — it reads objectName from the router (useParams, line 866), needs an objects metadata array (line 876), and types its whole props surface as any.

Measured leg, run in this worktree: the bare-rename form — import { ObjectView } from '@object-ui/app-shell' with an objectName prop — type-checks clean, tsc exit 0, zero diagnostics, while staying broken at runtime. That is the failure mode the neighbouring measurement named, now confirmed on this card's own file.

The spelling that works is ObjectView from @object-ui/plugin-view, the one examples/byo-backend-console/src/App.tsx already runs and the one PR objectui#7836 used for the root README.

What the snippets say now

All three carry a schema of type: 'object-view' with objectName, plus the dataSource prop the type requires (packages/plugin-view/dist/ObjectView.d.ts:43dataSource: DataSource, no question mark).

  • Section 2 mirrors src/App.tsx: a route renders a small ObjectPage of your own that pulls objectName from useParams and passes mockDataSource.
  • Section 3 and the Next.js block use useDataSource() from @object-ui/providers to show where the data source comes from inside DataSourceProvider — the same composition PR objectui#7836 introduced.

src/App.tsx is untouched: it is the reference this README must agree with. No export or type was minted anywhere, and no CHANGELOG was edited (the two historical ObjectRenderer mentions stay).

Compile check, by hand

This file is outside the doc gate's scan surface, so the compile check is not automatic. Measured with the gate's own listDocuments() rather than read off its header: 227 documents in the surface, 0 under examples/, this file absent; controls positive — root README.md present, 39 package READMEs present. check-readme-exports reports the same boundary in its census: "43 tracked README(s) under packages/ (0 outside any package)".

So all three snippets were transcribed into a scratch .tsx inside the example (never committed; removed before the commit) and judged by the example's own tsc --noEmit with its own tsconfig, against the built dist/index.d.ts of each package.

baseline, before the scratch file      tsc --noEmit   exit 0
three README snippets transcribed      tsc --noEmit   exit 0

Not a hoped-for green — --listFiles proves what was in the program: the scratch file present, and packages/plugin-view/dist/ObjectView.d.ts, packages/providers/dist/DataSourceProvider.d.ts, packages/app-shell/dist/... among 3002 files.

Three planted errors, each proven on disk before the run and restored by sha256 afterwards:

old spelling restored                  TS2305  Module '@object-ui/app-shell' has no exported member 'ObjectRenderer'
dataSource prop deleted                TS2741  Property 'dataSource' is missing ... required in type 'ObjectViewProps'
schema key objectName renamed          TS2741  Property 'objectName' is missing ... required in type 'ObjectViewSchema'

Restored tree back to exit 0. Name-count leg on the file itself: ObjectRenderer in the README 6 to 0, with packages/app-shell/CHANGELOG.md as the control, still 1.

Gates

Run at f2c189cc6, verdict lines as each gate printed them:

check:doc-fences          exit 0   every TypeScript block in 227 document(s) is fenced ts/tsx/typescript
check:control-bytes       exit 0   scanned 6407 tracked text file(s); skipped 85 binary
check-doc-links.mjs       exit 0   Links are valid across 17 scan roots.
check:readme-exports      exit 0   43 README(s) under packages/ (0 outside any package), 0 unbuilt
check-changeset-presence  exit 0   no changeset is owed (0 published source files changed)
governed-queue-guard      NOT GOVERNED — 1 path checked against 5 governed surface(s)

check:readme-exports first reported exit 1 naming 61 unjudgeable self-imports, every one of them "type entry not on disk — run pnpm build first". That is an unmet prerequisite, not a red gate: after a full turbo run build it prints 0 unbuilt and passes. Recorded rather than dropped.

Files changed: 1. No changeset owed — an example README publishes nothing.

Related: objectui#7094 (the sweep that filed it), objectui#7838 (same phantom in docs/ARCHITECTURE.md, a separate card).

Draft, no auto-merge, per dispatch.


Generated by Claude Code

…ectRenderer

`examples/byo-backend-console/README.md` taught `ObjectRenderer` from
`@object-ui/app-shell` in three snippets (six sites). No export of any package
in this repository bears that name, so the import does not resolve — and it is
the copy-paste starting point for the bring-your-own-backend path.

A bare rename to `@object-ui/app-shell`'s `ObjectView` was measured and
rejected: that component reads `objectName` from the router via `useParams`,
needs an `objects` metadata array, and types its whole props surface as `any`,
so a wrong prop raises nothing at build time. Measured here: the bare-rename
form type-checks clean (tsc exit 0, zero diagnostics) while staying broken at
runtime.

The spelling that works is `ObjectView` from `@object-ui/plugin-view`, in the
shape this example's own `src/App.tsx` already runs: a `schema` of
`type: 'object-view'` carrying `objectName`, plus the `dataSource` prop its
type requires. The snippets now show where that data source comes from —
directly in the App.tsx mirror, and via `useDataSource()` from
`@object-ui/providers` inside `DataSourceProvider` for the generic ones.

Verified by transcribing all three snippets into a scratch .tsx inside the
example (not committed) and running the example's own `tsc --noEmit` against
the built `dist/index.d.ts` of each package: green, with the scratch file and
those dist types proven present in the 3002-file program via `--listFiles`.
Three planted errors each turned it red and were restored by hash.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013uAaxiwgYDybsTNV9xwa1M
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

examples/byo-backend-console/README.md teaches ObjectRenderer, an export that exists nowhere in the repo

2 participants